package com.smart.model.convert;

import com.smart.model.dtomapper.StreetDtoMapper;
import com.smart.model.domain.StreetDO;
import com.smart.model.vo.StreetVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class StreetConvert {

    public static List<StreetVO> buildStreetVoList(List<StreetDO> streetDOList) {
        if (CollectionUtils.isEmpty(streetDOList)) {
            return Lists.newArrayList();
        }
        List<StreetVO> streetVOList = new ArrayList<>();
        for (StreetDO streetDO : streetDOList) {
            streetVOList.add(StreetDtoMapper.INSTANCE.do2VO(streetDO));
        }

        return streetVOList;
    }
}
